package com.my.object;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "registeration")
public class Registeration {
	@Id
	@Column(name = "id")
	private int id;
	@Column(name = "created_date")
	private Date created_date;

	@ManyToOne
	@JoinColumn(name = "student_id")
	private Student student;

	@ManyToOne
	@JoinColumn(name = "major_id")
	private Major major;

	@ManyToOne
	@JoinColumn(name = "academy_year_id")
	private AcademyYear academyyear;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Date getCreated_date() {
		return created_date;
	}

	public void setCreated_date(Date created_date) {
		this.created_date = created_date;
	}

	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	@Override
	public String toString() {
		return "Registeration [id=" + id + ", created_date=" + created_date
				+ ", student=" + student + ", major=" + major
				+ ", academyyear=" + academyyear + "]";
	}

	public Major getMajor() {
		return major;
	}

	public void setMajor(Major major) {
		this.major = major;
	}

	public AcademyYear getAcademyyear() {
		return academyyear;
	}

	public void setAcademyyear(AcademyYear academyyear) {
		this.academyyear = academyyear;
	}

}
